<?php

namespace common\models\iliketry;

use Yii;

/**
 * This is the model class for table "iliketry.order".
 *
 * @property integer $no
 * @property integer $product_no
 * @property integer $spec_no
 * @property integer $member_no
 * @property string $order_code
 * @property string $area
 * @property string $adress
 * @property string $code
 * @property string $call
 * @property string $status
 * @property string $add_time
 * @property string $product_name
 * @property string $spec_desc
 * @property string $member_email
 * @property string $member_name
 * @property string $cell
 * @property string $content
 * @property string $phuo_member_name
 * @property string $shuo_member_name
 * @property string $pf_time
 * @property string $pfw_time
 * @property string $lou
 * @property string $ceng
 * @property string $company
 * @property integer $district_no
 * @property string $cell_sussess
 * @property integer $city_no
 * @property integer $area_no
 * @property integer $delivery_no
 * @property integer $addtime
 * @property integer $origin
 * @property string $modify_time
 * @property integer $score
 * @property integer $e_no
 * @property integer $pay_order_no
 * @property integer $article_no
 * @property integer $article_no_2
 * @property integer $gid
 * @property integer $xt_free_no
 * @property integer $wap_free_no
 * @property integer $package_express_type
 */
class Order extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'iliketry.order';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['product_no', 'spec_no', 'member_no', 'district_no', 'city_no', 'area_no', 'delivery_no', 'addtime', 'origin', 'score', 'e_no', 'pay_order_no', 'article_no', 'article_no_2', 'gid', 'xt_free_no', 'wap_free_no', 'package_express_type'], 'integer'],
            [['spec_no', 'spec_desc', 'company', 'district_no', 'city_no', 'modify_time', 'e_no', 'pay_order_no', 'article_no'], 'required'],
            [['add_time', 'pf_time', 'pfw_time', 'modify_time'], 'safe'],
            [['order_code', 'area', 'adress', 'code', 'call', 'status', 'product_name', 'member_email', 'member_name', 'content', 'company'], 'string', 'max' => 255],
            [['spec_desc', 'lou', 'ceng'], 'string', 'max' => 30],
            [['cell'], 'string', 'max' => 25],
            [['phuo_member_name', 'shuo_member_name'], 'string', 'max' => 50],
            [['cell_sussess'], 'string', 'max' => 1],
            [['product_no', 'member_no'], 'unique', 'targetAttribute' => ['product_no', 'member_no'], 'message' => 'The combination of Product No and Member No has already been taken.'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'no' => 'ID',
            'product_no' => 'Product No',
            'spec_no' => '产品规格ID',
            'member_no' => 'Member No',
            'order_code' => '订单号',
            'area' => '所在地区',
            'adress' => '地址',
            'code' => '邮编',
            'call' => '电话',
            'status' => '状态',
            'add_time' => '添加时间',
            'product_name' => 'Product Name',
            'spec_desc' => '规格',
            'member_email' => 'Member Email',
            'member_name' => 'Member Name',
            'cell' => 'Cell',
            'content' => '理由',
            'phuo_member_name' => '配货人',
            'shuo_member_name' => '送货人',
            'pf_time' => 'Pf Time',
            'pfw_time' => '已发货时间',
            'lou' => 'Lou',
            'ceng' => 'Ceng',
            'company' => '公司名称',
            'district_no' => 'District No',
            'cell_sussess' => '手机是否可以收到信息',
            'city_no' => '城市',
            'area_no' => '区域id',
            'delivery_no' => '本订单送货方式，0小司机送货，1上门自提，2自付快递，3网点领取，11短信派送',
            'addtime' => '订单生成时间',
            'origin' => '来源,0:主站,1:minisite',
            'modify_time' => '状态变化时间',
            'score' => '喜元数量',
            'e_no' => '电子券',
            'pay_order_no' => '付费订单no',
            'article_no' => 'article_no',
            'article_no_2' => 'Article No 2',
            'gid' => 'Gid',
            'xt_free_no' => '校推wap_free_no',
            'wap_free_no' => 'wap_free表no',
            'package_express_type' => '1韵达快递 2邮政',
        ];
    }
}
